3.257 \(\int \frac{1}{-1+a+a x^2} \, dx\)

Optimal. Leaf size=30 \[ -\frac{\tanh ^{-1}\left (\frac{\sqrt{a} x}{\sqrt{1-a}}\right )}{\sqrt{(1-a) a}} \]

[Out]

-(ArcTanh[(Sqrt[a]*x)/Sqrt[1 - a]]/Sqrt[(1 - a)*a])

_______________________________________________________________________________________

Rubi [A]  time = 0.0575441, antiderivative size = 30, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.1 \[ -\frac{\tanh ^{-1}\left (\frac{\sqrt{a} x}{\sqrt{1-a}}\right )}{\sqrt{(1-a) a}} \]

Antiderivative was successfully verified.

[In]  Int[(-1 + a + a*x^2)^(-1),x]

[Out]

-(ArcTanh[(Sqrt[a]*x)/Sqrt[1 - a]]/Sqrt[(1 - a)*a])

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 3.5803, size = 27, normalized size = 0.9 \[ - \frac{\operatorname{atanh}{\left (\frac{\sqrt{a} x}{\sqrt{- a + 1}} \right )}}{\sqrt{a} \sqrt{- a + 1}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(1/(a*x**2+a-1),x)

[Out]

-atanh(sqrt(a)*x/sqrt(-a + 1))/(sqrt(a)*sqrt(-a + 1))

_______________________________________________________________________________________

Mathematica [A]  time = 0.0191679, size = 28, normalized size = 0.93 \[ \frac{\tan ^{-1}\left (\frac{\sqrt{a} x}{\sqrt{a-1}}\right )}{\sqrt{a-1} \sqrt{a}} \]

Antiderivative was successfully verified.

[In]  Integrate[(-1 + a + a*x^2)^(-1),x]

[Out]

ArcTan[(Sqrt[a]*x)/Sqrt[-1 + a]]/(Sqrt[-1 + a]*Sqrt[a])

_______________________________________________________________________________________

Maple [A]  time = 0.006, size = 20, normalized size = 0.7 \[{1\arctan \left ({ax{\frac{1}{\sqrt{ \left ( -1+a \right ) a}}}} \right ){\frac{1}{\sqrt{ \left ( -1+a \right ) a}}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(1/(a*x^2+a-1),x)

[Out]

1/((-1+a)*a)^(1/2)*arctan(a*x/((-1+a)*a)^(1/2))

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/(a*x^2 + a - 1),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.22842, size = 1, normalized size = 0.03 \[ \left [\frac{\log \left (\frac{2 \,{\left (a^{2} - a\right )} x +{\left (a x^{2} - a + 1\right )} \sqrt{-a^{2} + a}}{a x^{2} + a - 1}\right )}{2 \, \sqrt{-a^{2} + a}}, \frac{\arctan \left (\frac{\sqrt{a^{2} - a} x}{a - 1}\right )}{\sqrt{a^{2} - a}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/(a*x^2 + a - 1),x, algorithm="fricas")

[Out]

[1/2*log((2*(a^2 - a)*x + (a*x^2 - a + 1)*sqrt(-a^2 + a))/(a*x^2 + a - 1))/sqrt(
-a^2 + a), arctan(sqrt(a^2 - a)*x/(a - 1))/sqrt(a^2 - a)]

_______________________________________________________________________________________

Sympy [A]  time = 0.399604, size = 83, normalized size = 2.77 \[ - \frac{\sqrt{- \frac{1}{a \left (a - 1\right )}} \log{\left (- a \sqrt{- \frac{1}{a \left (a - 1\right )}} + x + \sqrt{- \frac{1}{a \left (a - 1\right )}} \right )}}{2} + \frac{\sqrt{- \frac{1}{a \left (a - 1\right )}} \log{\left (a \sqrt{- \frac{1}{a \left (a - 1\right )}} + x - \sqrt{- \frac{1}{a \left (a - 1\right )}} \right )}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/(a*x**2+a-1),x)

[Out]

-sqrt(-1/(a*(a - 1)))*log(-a*sqrt(-1/(a*(a - 1))) + x + sqrt(-1/(a*(a - 1))))/2
+ sqrt(-1/(a*(a - 1)))*log(a*sqrt(-1/(a*(a - 1))) + x - sqrt(-1/(a*(a - 1))))/2

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.208394, size = 31, normalized size = 1.03 \[ \frac{\arctan \left (\frac{a x}{\sqrt{a^{2} - a}}\right )}{\sqrt{a^{2} - a}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/(a*x^2 + a - 1),x, algorithm="giac")

[Out]

arctan(a*x/sqrt(a^2 - a))/sqrt(a^2 - a)